package java_zuoye_2;
import java.util.Arrays;
import java.util.Random;

public class homework_3 {
	public static void main(String[] arg) {
		int[] arr1 = {1,2,3,4,5};
		System.out.println(Arrays.toString(changeNums(arr1)));
	}
	
	public static int[] changeNums(int[] array) {
		 Random random = new Random();
	        for (int i = array.length - 1; i > 0; i--) {
	            int j = random.nextInt(i + 1);
	            Integer temp = array[i];
	            array[i] = array[j];
	            array[j] = temp;
	        }
	        return array;
	    }
	}

